﻿namespace C12_Ex03_Shaked_032675316_Itay_032511057
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Drawing;
    using System.Windows.Forms;

    public class BorderControlPainter : IControlPainter
    {
        public void Paint(PaintEventArgs pe)
        {
            SolidBrush brush = new SolidBrush(Color.Black);
            Pen pen = new Pen(brush, 3);
            Rectangle borderRect = new Rectangle(pe.ClipRectangle.X, pe.ClipRectangle.Y, pe.ClipRectangle.Width - 1, pe.ClipRectangle.Height - 1);
            pe.Graphics.DrawRectangle(pen, borderRect);
        }
    }
}
